import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from '@store';

const requireAll = (requireContext) => requireContext.keys().map(requireContext);

// 导入插件
const requirePlugins = require.context('@plugins', true, /^(?!_)\S+.js$/);
requireAll(requirePlugins);

// 导入指令
const requireDirectives = require.context('@directives', true, /.js$/);
requireAll(requireDirectives);

// 导入过滤器
const requireFilters = require.context('@filters', true, /.js$/);
requireAll(requireFilters);

// 导入公共样式
const requireStyles = require.context('@stylesheets', true, /^(?!_)\S+.scss$/);
requireAll(requireStyles);

Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: (h) => h(App)
}).$mount('#app');
